<!doctype html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<script src="../../assert_selection.js"></script>
<script>
selection_test(
  '<div contenteditable dir="ltr">|\n Just\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n ^Just\n <span>testing what</span>\n ever|\n</div>',
  '15-0 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n| Just\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n ^Just\n <span>testing what</span>\n ever|\n</div>',
  '15-1 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n |Just\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n ^Just\n <span>testing what</span>\n ever|\n</div>',
  '15-2 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n J|ust\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n J^ust\n <span>testing what</span>\n ever|\n</div>',
  '15-3 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Ju|st\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Ju^st\n <span>testing what</span>\n ever|\n</div>',
  '15-4 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Jus|t\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Jus^t\n <span>testing what</span>\n ever|\n</div>',
  '15-5 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just|\n <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just^\n <span>testing what</span>\n ever|\n</div>',
  '15-6 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n| <span>testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>^testing what</span>\n ever|\n</div>',
  '15-7 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>|testing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>^testing what</span>\n ever|\n</div>',
  '15-8 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>t|esting what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>t^esting what</span>\n ever|\n</div>',
  '15-9 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>te|sting what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>te^sting what</span>\n ever|\n</div>',
  '15-10 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>tes|ting what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>tes^ting what</span>\n ever|\n</div>',
  '15-11 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>test|ing what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>test^ing what</span>\n ever|\n</div>',
  '15-12 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testi|ng what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testi^ng what</span>\n ever|\n</div>',
  '15-13 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testin|g what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testin^g what</span>\n ever|\n</div>',
  '15-14 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing| what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing^ what</span>\n ever|\n</div>',
  '15-15 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing |what</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing ^what</span>\n ever|\n</div>',
  '15-16 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing w|hat</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing w^hat</span>\n ever|\n</div>',
  '15-17 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing wh|at</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing wh^at</span>\n ever|\n</div>',
  '15-18 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing wha|t</span>\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing wha^t</span>\n ever|\n</div>',
  '15-19 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>|\n ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n ever|\n</div>',
  '15-20 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n| ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ^ever|\n</div>',
  '15-21 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n |ever\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ^ever|\n</div>',
  '15-22 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n e|ver\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n e^ver|\n</div>',
  '15-23 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ev|er\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ev^er|\n</div>',
  '15-24 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n eve|r\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n eve^r|\n</div>',
  '15-25 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ever|\n</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ever|\n</div>',
  '15-26 ltr forward lineboundary');

selection_test(
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ever\n|</div>',
  selection => selection.modify('extend', 'forward', 'lineboundary'),
  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>\n ever|\n</div>',
  '15-27 ltr forward lineboundary');
</script>
